<div ng-controller="PatientDetailsCtrl" ng-init="init(items)">
    <div class="modal-header">
        <h3 class="modal-title">{{ 'business.navtitle.editpatient' | translate }}
            <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span></button>
        </h3>
    </div>
    <div class="modal-body">
        <tabset class="tab-container">
            <tab heading="{{ 'business.navtitle.patinfo' | translate }}">
                <form id="patientFrm" name="form1" ng-submit="submit($event)" role="patient">

                    <div class="form-group" style="position: relative;">
                        <!--shenfenzheng-->
                        <label class="col-sm-2">{{ 'user.icNo' | translate }} </label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" ng-minlength="15" maxlength="18"
                                   ng-model="patient._user.icNo" ng-disabled="viewOnly" name="icNo"
                                   ng-blur="onCheckIcNo($event, patient._user.icNo, patient.patient_Id)" autocomplete="off">
                        </div>
                        <!--xingming-->
                        <label class="col-sm-2">{{ 'user.realname' | translate }} <h4 class="starStyle">*</h4></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" required
                                   ng-model="patient._user.realName" ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <div class="clearfix"></div>
                        <!--xingbie-->
                        <label class="col-sm-2">{{ 'user.gender' | translate }} <h4 class="starStyle">*</h4></label>
                        <div class="col-sm-4">
                            <select class="form-control" required ng-model="patient._user.gender" ng-disabled="viewOnly"
                                    ng-options="item.value as item['displayName' + locale] for item in gender"></select>
                        </div>
                        <!--hunying-->
                        <label class="col-sm-2">{{ 'user.marriage' | translate }} <h4 class="starStyle">*</h4></label>
                        <div class="col-sm-4">
                            <select class="form-control" required ng-model="patient._user.marriage" ng-disabled="viewOnly"
                                    ng-options="item.value as item['displayName' + locale] for item in marriage"></select>
                        </div>
                        <div class="clearfix"></div>
                        <!--minzu-->
                        <label class="col-sm-2">{{ 'user.ethnic' | translate }} <h4 class="starStyle">*</h4></label>
                        <div class="col-sm-4">
                            <select class="form-control" required ng-model="patient._user.race_Id" ng-disabled="viewOnly"
                                    ng-options="item.race_Id as item.race_Name for item in races"></select>
                        </div>

                        <div class="clearfix"></div>
                        <!--year-->
                        <label class="col-sm-2">{{ 'user.year' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" maxlength="4" name="birthYear"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   ng-model="patient._user.birth_Year"
                                   ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <!--month-->
                        <label class="col-sm-2">{{ 'user.month' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" maxlength="2"
                                   onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                   ng-model="patient._user.birth_Month"
                                   ng-disabled="viewOnly" autocomplete="off">
                        </div>

                        <div class="clearfix"></div>
                        <!--zhiye-->
                        <label class="col-sm-2">{{ 'user.occupation' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control"
                                   ng-model="patient._user.occupation" ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <!--danwei-->
                        <label class="col-sm-2">{{ 'user.workplace' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control"
                                   ng-model="patient._user.workPlace" ng-disabled="viewOnly" autocomplete="off">
                        </div>

                        <div class="clearfix"></div>
                        <!--guojia-->
                        <label class="col-sm-2">{{ 'user.country' | translate }}</label>
                        <div class="col-sm-4">

                            <ui-select ng-model="patient._user._country" ng-disabled="viewOnly" ng-if="locale=='En'">
                                <ui-select-match placeholder="{{ 'business.patcase.search_a_country' | translate }}" allow-clear="true">
                                    {{ $select.selected.country_En_Name }}
                                </ui-select-match>
                                <ui-select-choices repeat="item in countries | filter: { country_En_Name: $select.search }" position="auto">
                                    <span ng-bind-html="item.country_En_Name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                            <ui-select ng-model="patient._user._country" ng-disabled="viewOnly" ng-if="locale=='Cn'">
                                <ui-select-match placeholder="{{ 'business.patcase.search_a_country' | translate }}" allow-clear="true">
                                    {{ $select.selected.country_Cn_Name }}
                                </ui-select-match>
                                <ui-select-choices repeat="item in countries | filter: { country_Cn_Name: $select.search }" position="auto">
                                    <span ng-bind-html="item.country_Cn_Name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                        </div>
                        <!--shen-->
                        <label class="col-sm-2">{{ 'user.province' | translate }}</label>
                        <div class="col-sm-4">
                            <ui-select ng-model="patient._user._province">
                                <ui-select-match placeholder="{{ 'business.patcase.search_a_province' | translate }}" allow-clear="true">
                                    {{ $select.selected.loca_Cn_Name }}
                                </ui-select-match>


                                <ui-select-choices repeat="item in provinces | filter: { loca_Cn_Name: $select.search }" position="auto">
                                    <span ng-bind-html="item.loca_Cn_Name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                        </div>
                        <div class="clearfix"></div>
                        <!--shi-->
                        <label class="col-sm-2">{{ 'user.city' | translate }}</label>
                        <div class="col-sm-4">
                            <ui-select ng-model="patient._user._city" ng-disabled="viewOnly">
                                <ui-select-match placeholder="{{ 'business.patcase.search_a_city' | translate }}" allow-clear="true">
                                    {{ $select.selected.loca_Cn_Name }}
                                </ui-select-match>
                                <ui-select-choices repeat="item in cities | filter: { loca_Cn_Name: $select.search }" position="auto">
                                    <span ng-bind-html="item.loca_Cn_Name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                        </div>
                        <!--xian-->
                        <label class="col-sm-2">{{ 'user.county' | translate }}</label>
                        <div class="col-sm-4">
                            <ui-select ng-model="patient._user._county">
                                <ui-select-match placeholder="{{ 'business.patcase.search_a_county' | translate }}" allow-clear="true">
                                    {{ $select.selected.loca_Cn_Name }}
                                </ui-select-match>
                                <ui-select-choices repeat="item in counties | filter: { loca_Cn_Name: $select.search }" position="auto">
                                    <span ng-bind-html="item.loca_Cn_Name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                        </div>
                        <div class="clearfix"></div>

                        <label class="col-sm-2">{{ 'user.mobilephone' | translate }} <h4 class="starStyle">*</h4></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" required maxlength="11"
                                   ng-pattern="/^1[3|4|5|7|8][0-9]{9}$/" name="mobilephone"
                                   ng-model="patient._user.mobile_Phone" ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <div style="position: absolute;bottom: 85px;left: 100px;color: red;z-index: 99;">
                            <span ng-show="form1.mobilephone.$error.pattern">{{ 'user.mobilephoneMatch' | translate }}</span>
                        </div>
                        <label class="col-sm-2">{{ 'user.telephone' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" min="0" data-max="200"
                                   ng-model="patient._user.telephone" ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <div class="clearfix"></div>

                        <label class="col-sm-2">{{ 'user.emergencycontact' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" min="0" data-max="200"
                                   ng-model="patient._user.emerg_Contact" ng-disabled="viewOnly" autocomplete="off">
                        </div>

                        <label class="col-sm-2">{{ 'user.emergencymobile' | translate }}</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" min="0" data-max="200"
                                   ng-model="patient._user.emerg_Contact_Mobile" ng-disabled="viewOnly" autocomplete="off">
                        </div>
                        <div class="clearfix"></div>

                        <label class="col-sm-2">{{ 'user.address' | translate }}</label>
                        <div class="col-sm-10">
                            <textarea style="resize:none;" class="form-control no-radius"
                                      ng-model="patient._user.location_Address" ng-disabled="viewOnly" autocomplete="off"></textarea>
                        </div>
                        <div class="clearfix"></div>

                    </div>

                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div class="form-group">
                        <label>{{ 'business.navtitle.personalhistory' | translate }}</label>
                        <div>
                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_HighBlood"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_HighBlood ==1">
                                {{ 'business.patcase.history_HighBlood' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_HighBlood == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_HighBlood_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_HighBlood_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div>

                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Diabete"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Diabete == 1">
                                {{ 'business.patcase.history_Diabete' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_Diabete == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Diabete_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Diabete_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div>

                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Cardiov"
                                       ng-true-value="1" ng-false-value="0"  ng-checked="patient.history_Cardiov == 1">
                                {{ 'business.patcase.history_Cardiov' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_Cardiov == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Cardiov_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Cardiov_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div>
                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Epidemic"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Epidemic == 1">
                                {{ 'business.patcase.history_Epidemic' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_Epidemic == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Epidemic_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Epidemic_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div>
                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Surgery"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Surgery == 1">
                                {{ 'business.patcase.history_Surgery' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_Surgery == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Surgery_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Surgery_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div>

                            <label class="checkbox-inline col-xs-12 col-sm-3">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Allergy"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Allergy == 1">
                                {{ 'business.patcase.history_Allergy' | translate }}
                            </label>
                            <label class="checkbox-inline col-xs-12 col-sm-8" ng-show="patient.history_Allergy == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Allergy_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Allergy_Desc' | translate }}"></textarea>
                            </label>

                            <div class="clearfix"></div><br/>

                        </div>
                        <div class="clearfix"></div>
                    </div>

                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div class="form-group">
                        <label>{{ 'business.navtitle.pathistory' | translate }}</label>
                        <div>
                            <label class="checkbox-inline col-sm-4">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Smoke"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Smoke == 1">
                                {{ 'business.patcase.history_Smoke' | translate }}
                            </label>
                            <label class="checkbox-inline col-sm-4" ng-show="patient.history_Smoke == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Smoke_Desc" rows="2"
                                          placeholder="{{ 'business.patcase.history_Smoke_Desc' | translate }}"></textarea>
                            </label>
                            <div class="clearfix"></div>
                            <label class="checkbox-inline col-sm-4">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Drinking"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Drinking == 1">
                                {{ 'business.patcase.history_Drinking' | translate }}
                            </label>
                            <label class="checkbox-inline col-sm-4" ng-show="patient.history_Drinking == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Drinking_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Drinking_Desc' | translate }}"></textarea>
                            </label>
                            <div class="clearfix"></div>
                            <label class="checkbox-inline col-sm-4">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Chem"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Chem == 1">
                                {{ 'business.patcase.history_Chem' | translate }}
                            </label>
                            <label class="checkbox-inline col-sm-4" ng-show="patient.history_Chem == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Chem_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Chem_Desc' | translate }}"></textarea>
                            </label>
                            <div class="clearfix"></div>

                            <label class="checkbox-inline col-sm-4">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_EPIArea"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_EPIArea == 1">
                                {{ 'business.patcase.history_EPIArea' | translate }}
                            </label>
                            <label class="checkbox-inline col-sm-4" ng-show="patient.history_EPIArea == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_EPIArea_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_EPIArea_Desc' | translate }}"></textarea>
                            </label>
                            <div class="clearfix"></div>
                            <label class="checkbox-inline col-sm-4">
                                <input type="checkbox" ng-disabled="viewOnly" ng-model="patient.history_Other"
                                       ng-true-value="1" ng-false-value="0" ng-checked="patient.history_Other == 1">
                                {{ 'business.patcase.history_Other' | translate }}
                            </label>
                            <label class="checkbox-inline col-sm-4" ng-show="patient.history_Other == 1">
                                <textarea style="resize:none;" class="form-control" ng-model="patient.history_Other_Desc" rows="2" ng-disabled="viewOnly"
                                          placeholder="{{ 'business.patcase.history_Other_Desc' | translate }}"></textarea>
                            </label>
                        </div>
                        <div class="clearfix"></div>
                    </div>

                    <footer class="panel-footer text-center bg-light lter">
                        <button class="btn btn-default" type="button" ng-click="cancelPatient(isSubmit)" translate="common.cancel"></button>
                        <button class="btn btn-success" type="button" ng-click="onEdit()" ng-show="false" translate="common.edit"></button>
                        <button class="btn btn-success" type="submit" ng-disabled="form1.$invalid" ng-show="!viewOnly"
                                data-loading-text="{{ 'common.loading' | translate }}" translate="common.submit"></button>
                        &nbsp;&nbsp;&nbsp;<span ng-show="form1.$invalid"  style="color: red" translate="common.mustIpt"></span>
                    </footer>
                </form>
            </tab>

            <tab heading="{{ 'business.navtitle.patcaseinfo' | translate }}" ng-controller="AddPatientCaseCtrl">
                <accordion close-others="oneAtATime" ng-init="getPatientCases(items)">
                    <accordion-group ng-repeat="item in ArrPatCases  track by $index"  is-open="item.isedit">
                        <accordion-heading>
                            <div class="header-styfix">
                                <b>{{item.title}}</b>
                                <small class="pull-right sm-cf"> <span translate="common.updated"></span>: {{item.updatedF}}</small>
                            </div>
                        </accordion-heading>
                        <form role="patcase" ng-submit="savePatientCase(item)">
                            <div class="form-group">
                                <label>{{'business.patcase.disease_Site' | translate}} <h4 class="starStyle">*</h4></label> <br/>
                                <span ng-repeat="ds in diseaseSiteList" class="m-r-md">
                                      <input type="checkbox" checklist-model="item.disease_Site_Array" checklist-value="ds"
                                             ng-disabled="item.canModify"  ng-required="item.disease_Site_Array.length == 0"/>
                                    {{'business.patcase.disease_Site_' + ds.desc | translate}}
                                </span>
                            </div>
                            <div class="form-group">
                                <label>{{ 'business.patcase.brief_Desc' | translate }} <h4 class="starStyle">*</h4></label>
                                <input type="text" ng-model="item.brief_Desc" class="form-control"
                                        ng-disabled="item.canModify" required autocomplete="off">
                            </div>
                            <div class="form-group">
                                <label>{{ 'business.patcase.main_Desc' | translate }} <h4 class="starStyle">*</h4></label>
                                <textarea style="resize:none;" rows="3" ng-model="item.main_Desc" class="form-control" style="overflow:auto;height:100px;max-height:100px"  ng-disabled="item.canModify" required></textarea>
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label padding-rl">{{ 'business.patcase.spirit_State' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="spirit_state" ng-model="item.spirit_State" value="verygood"  ng-disabled="item.canModify" required>
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="spirit_state" ng-model="item.spirit_State" value="notgood"  ng-disabled="item.canModify" required>
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label padding-rl">{{ 'business.patcase.strength' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="strength" ng-model="item.strength" value="verygood"  ng-disabled="item.canModify" required>
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="strength" ng-model="item.strength" value="notgood"  ng-disabled="item.canModify" required>
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label padding-rl">{{ 'business.patcase.appetite' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="verygood"  ng-disabled="item.canModify" required>
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="good"  ng-disabled="item.canModify" required>
                                            {{ 'common.good' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="appetite" ng-model="item.appetite" value="notgood"  ng-disabled="item.canModify" required>
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label padding-rl">{{ 'business.patcase.sleeping' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="verygood"  ng-disabled="item.canModify" required>
                                            {{ 'common.verygood' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="good"  ng-disabled="item.canModify" required>
                                            {{ 'common.good' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="sleeping" ng-model="item.sleeping" value="notgood"  ng-disabled="item.canModify" required>
                                            {{ 'common.notgood' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2 control-label padding-rl" style="padding-right:0;">{{ 'business.patcase.gatism_Handling' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="usual"  ng-disabled="item.canModify" required>
                                            {{ 'common.usual' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="stool_usual"  ng-disabled="item.canModify" required>
                                            {{ 'business.patcase.gatHand_stool' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="gatism_handling" ng-model="item.gatism_Handling" value="urine_usual"  ng-disabled="item.canModify" required>
                                            {{ 'business.patcase.gatHand_urine' | translate }}
                                        </label>
                                    </div>
                                    <label class="col-sm-2 control-label padding-rl">{{ 'business.patcase.method_Transport' | translate
                                        }} <h4 class="starStyle">*</h4></label>

                                    <div class="col-sm-4 padding-rl">
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="usual"  ng-disabled="item.canModify" required>
                                            {{ 'common.usual' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="wheelchair"  ng-disabled="item.canModify" required>
                                            {{ 'business.patcase.metTran_wheelchair' | translate }}
                                        </label>
                                        <label>
                                            <input type="radio" name="method_transport" ng-model="item.method_Transport" value="ambulance"  ng-disabled="item.canModify" required>
                                            {{ 'business.patcase.metTran_ambulance' | translate }}
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.body_Temp' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.body_Temp"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" ng-style="styleFix" disabled>{{ 'common.degree' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.heart_Beat' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.heart_Beat"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.notimes' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.breath_Int' | translate }} </label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.breath_Int"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.notimes' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.weight' | translate }} <h4 class="starStyle">*</h4></label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.weight"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify" required
                                            	ng-blur="onChangeBmi($event, item)">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.kg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-sm-2 padding-rl">{{ 'business.patcase.weight_change' | translate }} <h4 class="starStyle">*</h4></label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.weight_Change"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify" required>
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.kg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2">{{ 'business.patcase.height' | translate }} <h4 class="starStyle">*</h4></label>
                                    <div class="col-sm-4">
                                        <div class="input-group">
                                            <input type="number" class="form-control" ng-model="item.height"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify" required
                                            	ng-blur="onChangeBmi($event, item)">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.cm' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-sm-2">{{ 'business.patcase.bmi' | translate }}</label>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="input-group" style="width:100%">
                                            <input type="number" class="form-control" ng-model="item.bmi"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="true" style="cursor:default" required>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-2 col-xs-12" style="padding-right:0;">{{ 'business.patcase.blood_Pressure' |
                                        translate
                                        }} </label>
                                    <div class="col-sm-4 col-xs-4">
                                        <div class="input-group" style="width:100%;">
                                            <input type="number"
                                                   style="padding-right:0;"
                                                   class="form-control" ng-model="item.blood_Pressure_High"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify">
                                        </div>
                                    </div>
                                    <div class="col-sm-1 col-xs-1 text-center" style="padding:0;">
                                        <span style="font-size: 24px">/</span>
                                    </div>
                                    <div class="col-sm-5 col-xs-7" style="padding-left: 5px">
                                        <div class="input-group">
                                            <input type="number" class="form-control"
                                                   style="padding-right:0;"
                                                   ng-model="item.blood_Pressure_Low"
                                                   onmouseup="this.value=this.value.replace(/\D/g,'')"
                                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                                   ng-disabled="item.canModify">
                                            <span class="input-group-btn">
                                                <button class="btn btn-default" type="button" style="cursor:default" disabled>{{ 'common.mmHg' | translate }}</button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="line line-dashed b-b line-lg pull-in"></div>
			                    <div class="form-group row" ng-if="item._mediCases != ''">
			                        <label class="col-sm-2">{{ 'business.medicase.medicase' | translate }}</label>
			                    </div>
			                    <div class="form-group row" ng-if="item.patCase_Id == 0">
			                        <label class="col-sm-12">{{ 'business.medicase.createNote' | translate }}</label>
			                    </div>
			                    <div class="form-group row" ng-repeat="mediCase in item._mediCases">
		                            <label class="col-sm-2"></label>
		                            <div class="col-sm-8">
		                                <div class="input-group">
		                                    <img ng-click="openShowImage(mediCase)" ng-src="{{currentUser.mediCaseThumbUrl}}{{mediCase.mediCase_Id}}">
		                                </div>
		                            </div>
		                            <div class="col-sm-2">
		                                <div class="input-group">
		                                    <a class="btn btn-warning" ng-click="deleteMediCase(item, mediCase)" translate="common.delete">Delete</a>
		                                    <a class="btn btn-warning" ng-if="$first!=true" ng-click="moveUpMediCase(item, mediCase)" translate="business.medicase.moveUp">moveUp</a>
		                                    <a class="btn btn-warning" ng-if="$last!=true" ng-click="moveDownMediCase(item, mediCase)" translate="business.medicase.moveDown">moveDown</a>
		                                </div>
		                            </div>
			                     </div>
                            </div>

                            <footer class="panel-footer text-right bg-light lter">
                                <a class="btn btn-primary btn-fix" type="button" ng-if="item.patCase_Id > 0"
                                        title="{{ 'business.patcase.view_dicom' | translate }}"
                                        translate="business.patcase.view_dicom"
                                        ng-click="redirectToDicomViewer(item.patCase_Id)"></a>
                                <a class="btn btn-warning btn-fix" ng-click="cancelPatientCase(item)" translate="common.cancel">{{item.canModify}}Cancel</a>
                                <a class="btn btn-success" ng-click="openUploadImage(item)" translate="business.medicase.add" ng-if="item.patCase_Id>0">{{item.canModify}}Upload</a>
                                <a class="btn btn-primary" type="submit" ng-disabled="item.canModify" translate="common.submit">Submit</a>
                            </footer>
                        </form>
                    </accordion-group>
                </accordion>
                <footer class="panel-footer text-center bg-light lter">
                    <button class="btn btn-cancel" ng-click="cancelPatient()" translate="common.cancel">Cancel</button>
                    <a class="btn btn-success" ng-click="createPatCase()" ng-show="patient.canAddPatCase" translate="common.add">Add New</a>
                </footer>
            </tab>
        </tabset>
    </div>
</div>

<script type="text/ng-template" id="UploadImage.html">
    <div class="modal-content">
      <div class="modal-header">
          <button type="button" style="height:42px;margin-right:10px;" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span></button>
        <h4 class="modal-title" id="myModalLabel"><span translate="business.medicase.medicase"></span></h4>
      </div>
      <div class="modal-body" ng-controller="UploaderController">
			<div class=" col-sm-12 btn btn-info" style="width:100%;">
                <span translate="business.medicase.add"></span>
                <input type="file" file-model="myFile" style="width:100%;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0; opacity: 0; cursor:pointer; position:absolute;top:0px; height:35px;" />
            </div>
            <div class="col-sm-12 panel panel-default">
				<img ng-src="{{imageSrc}}" class="img-responsive center-block" style="display:block; width:100%; height:100%;margin-top:15px; margin-bottom:15px;">
			</div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.cancel"></span></button>
        <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
      </div>
    </div>
</script>

<script type="text/ng-template" id="DeleteMediCase.html">
    <div class="modal-content">
      <div class="modal-header">
          <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span></button>
          <h4 class="modal-title" id="myModalLabel"><span translate="common.delete"></span></h4>
      </div>
      <div class="modal-body" ng-controller="AddPatientCaseCtrl">
			<div class="col-sm-12" style="width:100%;">
			<i class="icon-share-alt"></i>
			<span translate="common.deletealert"></span>
			</div>
			<br>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" ng-click="cancel()"><span translate="common.cancel"></span></button>
        <button type="button" class="btn btn-primary" ng-click="ok()"><span translate="common.ok"></span></button>
      </div>
    </div>
</script>
